# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libwacom
pkgver=1.12
pkgrel=1
pkgdesc="Library to identify Wacom tablets and their features"
arch=('x86_64')
url="https://github.com/linuxwacom/libwacom/wiki"
license=('MIT')
depends=('glib2' 'systemd' 'libgudev')
makedepends=('libxml2' 'meson')
checkdepends=('python-pytest' 'python-libevdev' 'python-pyudev')
validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF')
source=(https://github.com/linuxwacom/libwacom/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2{,.sig})
sha512sums=('4e0084eda01e78f52336f3f1f1ea3ea86cb9c5fdd6d6c0316662405ebe2a328d6837f8db855e58f5fa95a640a5d456a081a7de339a372bf851bc0d5c69530379'
            'SKIP')

build() {
  meson build $pkgname-$pkgver \
    --prefix=/usr
  ninja -C build
}

check() {
  ninja test -C build
}

package() {
  DESTDIR="$pkgdir" ninja install -C build
  install -D -m644 $pkgname-$pkgver/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
